package pld.car.dao.impl;

import pld.car.dao.*;
import pld.car.bean.CustMsg;

public class CustMsgDaoImpl extends BaseDaoImpl implements CustMsgDao {

	public CustMsgDaoImpl() {
		System.out.println("CustMsgDaoImpl init!");
	}

	// 根据id删除指定的留言
	public void delete(int id) {
		getHibernateTemplate().delete(getHibernateTemplate().get(CustMsg.class, id));
	}

	// 保存客户留言
	public void insert(CustMsg o) {
		getHibernateTemplate().save(o);
	}

	// 根据id查询到指定的新闻
	public CustMsg findMsgByID(int id) {
		return (CustMsg) getHibernateTemplate().get(CustMsg.class, id);
	}
}
